home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 619 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.1 KB

  1. Path: nntp.teleport.com!sschaem
  2. From: sschaem@teleport.com (Stephan Schaem)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: New C2P
  5. Date: 9 Jan 1996 18:33:52 GMT
  6. Organization: Teleport - Portland's Public Access (503) 220-1016
  7. Distribution: world
  8. Message-ID: <4cuceg$9an@maureen.teleport.com>
  9. References: <4ctiib$2ok@irz305.inf.tu-dresden.de>
  10. NNTP-Posting-Host: kelly.teleport.com
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Sven Steiniger (ss37@irz.inf.tu-dresden.de) wrote:
  14.  
  15. : - Stephan Schaem (sschaem@teleport.com) <4cjl2o$4im@maureen.teleport.com>
  16. : >:   - are there any very fast c2p which use a comparebuffer ?
  17. : >
  18. : > depand on the aplication I guess... The amiga mac emulator ShapwShifter
  19. : > has a range of driver that use Delta/checksum/mmu buffer in conjunction
  20. : > with the plannar/chunky buffer.
  21.  
  22. : Could you give me a hint what a Delta/checksum/mmu buffer is ?
  23. : ( I use a comparebuffer which check if a block of 8 pixels have changed. If
  24. : yes then the comparebuffer is updated and the converter starts. If not I
  25. : simply step to the next block)
  26.  
  27.  delta: I think that what they call compare.
  28.  
  29.  checksum: I call it that way ;)
  30.  
  31. .loop     ml    (a0)+,d1
  32.     REPEAT    15
  33.     add.l    (a0)+,d1
  34.     ENDR
  35.     cmp.l    (a1),d1
  36.     beq.b    .otherstateloop
  37.     ml    d1,(a1)+
  38. .c2p                    ;c2p 64 8bit pixels
  39.     dbra    d0,.loop
  40.  
  41. mmu:
  42.  
  43.  You partition your chunky buffer in X k pages.
  44.  You check the modified bit in the mmu page table descriptor, and
  45.  go do a checksum based c2p on it if the page is 'dirty'.
  46.  This is great for something with localized screen modification,
  47.  and 'static' display. 
  48.  In shapeshifter for example, no CPU will be used for the c2p code
  49.  while you compile... but if you play a quicktime movie it will only
  50.  checksum from ~windowy1pos to ~windowy2pos and c2p only the changing
  51.  data.
  52.  
  53. : Also someone wrote that you could do 12 or 13 instructions during chip
  54. : write. Is there somewhere (in aminet) a time-table on this ?
  55. : I found a c2p-converter which use selfmodifying code. This one copy himself
  56. : to a quadword-align memory-position. Does this give any advantages ? (I
  57. : think a 8bpl c2p is small enough to fit into the cache)
  58.  
  59.   It depand alot ... you cant write your own inst 'timer' in a flash. 
  60.  (It work for me, but might for you).
  61.  
  62.     mw #$4000,($dff09a).l
  63.     mw #$0100,($dff096).l
  64.     mw #$8400,($dff096).l
  65.  .Loop    cmp.b #100,($dff006).l
  66.     bne.b .Loop
  67.     mw #$004,($dff180).l
  68.     mw #iteration to fit frame,d7
  69.  ..    REPEAT X
  70.     You code to test
  71.     ENDR
  72.     dbra d7,.. 
  73.     mw #$fff,($dff180).l
  74.     btst #6,($bfe001).l
  75.     bne .Loop
  76.     mw #$8100,($dff096).l
  77.     mw #$0400,($dff096).l
  78.  
  79.  Then I do X*iteration*60 = 'mips'
  80.  If your code is a "add.l d1,d0" You will get 12.5 mips
  81.  on a 25mhz 030. (100 for X, 2080 for iteration)
  82.  Now create a large chip section, and replace "add.l..."
  83.  by "move.l  d0,(a1)+"  ?
  84.  Dont forget not to  set X to high, like X * codesize should not
  85.  be > cachesize. (But the closer to it is better because you are timming
  86.  the dbra too :)
  87.  Now just add instruction below the "move.l "  , add.l one since you know
  88.  its timing now ... and see how many you can fit.
  89.  
  90.  You know you have your optimal iteration count when you only see a short
  91.  dnacing white hline at the top level of the background/blue transition.
  92.  
  93.  Stephan
  94.  
  95.